package com.lonely.api.shein.config;

import com.lonely.api.shein.SheinOpenSDK;
import com.lonely.api.shein.service.SheinOpenSDKClient;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * shein sdk配置类
 *
 * @author fzzf
 */
@Configuration
@EnableConfigurationProperties(HttpClientConfig.class)
public class SheinSdkAutoConfiguration {

    /**
     * sdk 实体
     *
     * @param config
     * @return
     */
    @Bean
    public SheinOpenSDKClient sheinOpenSDKClient(HttpClientConfig config) {
        return SheinOpenSDK.getInstance(config);
    }
}
